<template>
  <div class="flow-title">标题: {{ processInstance.processTitle }}</div>
  <div class="flow-info">发起人: {{ processInstance.applyByName }} <span
      style="margin-left: 10px">发起时间: {{ processInstance.createTime }}</span></div>
  <div style="margin-top: 10px">
    <el-button icon="view" @click="previewFlow" round>查看流程</el-button>
  </div>
  <FlowModelWithHistory ref="refFlowModelWithHistory"/>
</template>
<script setup>
import {shallowRef} from 'vue';
import FlowModelWithHistory from '@/components/platwork/FlowModelWithHistory/index.vue';

const props = defineProps({
  processInstance: {}
});
const refFlowModelWithHistory = shallowRef();

function previewFlow() {
  refFlowModelWithHistory.value.setData(props.processInstance.id);
}

</script>